#pragma once

#include "NeroGame\NGame.h"

class TriangleApp;
class CubeApp;
class ShadowApp;
class Ball;

namespace Graphics
{
	class ModelList;
	class Frustum;
	class Light;
	class LightShader;
	class ParticleSystem;
	class ParticleShader;
	class RenderTexture;
	class RenderTarget;
	class TextureShader;
	class ColorShader;
}

class GraphicsApp : public Game::NGame
{
	enum State
	{
		No_State,
		RENDERTOTEXTURE_STATE,
		TRIAPP_STATE,
		CUBE_STATE,
		FRUSTUM_STATE,
		SHADOW_STATE,
		PARTICLE_STATE
	};

public:
	GraphicsApp(void);
	virtual ~GraphicsApp(void);
	virtual void Initialize(const std::string& scene);
	virtual void Deinitialize();
	virtual void Update(float gameTime);
	virtual void Render();
	virtual void PreRender();
	void HandleInput();

private:
	Ball* mSphereModel;
	Graphics::ModelList* mModelList;
	Graphics::Frustum* mFrustum;
	Graphics::Light* mLight;
	Graphics::LightShader* mLightShader;
	Graphics::TextureShader* mTextureShader;
	Graphics::ParticleShader* mParticleShader;
	Graphics::ParticleSystem* mParticleSystem;
	Graphics::ColorShader* mColorShader;
	State mCurrentState;

	TriangleApp* mTriApp;
	CubeApp* mCubeApp;
	ShadowApp* mShadowApp;
	
	static GraphicsApp s_Instance;
};

